package br.com.guidebar.enums;

import android.annotation.SuppressLint;
import android.util.SparseArray;

public class EnumPaymentState {
	@SuppressLint("UseSparseArrays")
	public static enum PaymentState {
		AguardandoPagamento(1, "Aguardando Pagamento"), EmAnalise(2,
				"Em Análise"), Pago(3, "Pago"), Disponivel(4, "Disponível"), EmDisputa(
				5, "Em Disputa"), Devolvida(6, "Devolvida"), Cancelada(7,
				"Cancelada"), NaoPago(8,"Não Pago");

		private Integer id;
		private String name;
		private static SparseArray<PaymentState> relations;

        PaymentState(Integer id, String name) {
			this.id = id;
			this.name = name;
		}

		public Integer getId() {
			return this.id;
		}

		public String getName() {
			return this.name;
		}

		public static PaymentState getEstadoPagamentoPorId(Integer isPago) {
			return relations.get(isPago);
		}

		static {
			relations = new SparseArray<PaymentState>();
			for (PaymentState p : values())
				relations.put(p.getId(), p);
		}

		
	}
}
